var sum=[1,2,3,4,5];
var m=prompt("请输入n:");
while(m--)
{
    sum.push(sum[0]);
    sum.push(sum[0]);
    sum.shift();
}  
var key=sum[sum.length-1];
switch (key) {
    case 1:
        document.write("小S");
        break;
    case 2:
        document.write("小L");
        break;
    case 3:
        document.write("小P");
        break;
    case 4:
        document.write("小R");
        break;
    case 5:
        document.write("小H");
        break;
    default:
        break;
}